import request  from "@/utils/request.js";

export default {
    userLogin(loginDto){
        return request({
            url:'/auth/login',
            method:'post',
            data:loginDto
        })
    },
    userRegister(registerDto){
        return request({
            url:'/auth/register',
            method:'post',
            data:registerDto
        })

    },
    getLoginUserInfo(){
        return request({
            url:'/auth/info',
            method:'get'
        })
    },
    updateUserProfile(profile){
        return request({
            url:'/auth/update/profile',
            method:'post',
            data:profile
        })
    },
    exitLogin(){
        return request({
            url:'/auth/logout',
            method:'get'
        })
    },
    updatePassword(passwordDto){
        return request({
            url:'/auth/update/pwd',
            method:'post',
            data:passwordDto
        })
    },
    updateBindEmail(bindEmailDto){
        return request({
            url:'/auth/bind/email',
            method:'post',
            data:bindEmailDto
        })
    }
}